/*
============================================================================
 Name        : PhoneCallMaker2.h
 Author      : 王斌
 Version     :
 Copyright   : 益盟软件
 Description : CPhoneCallMaker2 declaration
============================================================================
*/

#ifndef PHONECALLMAKER2_H
#define PHONECALLMAKER2_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include <Etel3rdParty.h>
// link to etel3rdparty.lib

class MAnsPhoneCallMakerObserver
{
public:
	virtual void HandleCallHungUpL() = 0;
};

// CLASS DECLARATION

/**
*  CPhoneCallMaker2
* 
*/
class CPhoneCallMaker2 : public CActive
{
public: // Constructors and destructor

	/**
        * Destructor.
        */
	~CPhoneCallMaker2();

        /**
        * Two-phased constructor.
        */
	static CPhoneCallMaker2* NewL(MAnsPhoneCallMakerObserver& aObserver);

        /**
        * Two-phased constructor.
        */
	static CPhoneCallMaker2* NewLC(MAnsPhoneCallMakerObserver& aObserver);

private:

	/**
        * Constructor for performing 1st stage construction
        */
	CPhoneCallMaker2(MAnsPhoneCallMakerObserver& aObserver);

	/**
        * EPOC default constructor for performing 2nd stage construction
        */
	void ConstructL();

public:
	void MakeCallL(const TDesC& aNumber);
	
	void DoCancel();

	void RunL();
private:
	MAnsPhoneCallMakerObserver& 			iObserver;
	CTelephony* 			iTelephony;
	CTelephony::TCallId 	        iCallId;
	CTelephony::TCallParamsV1           iCallParams;
	CTelephony::TCallParamsV1Pckg       iCallParamsPckg;
	//CTelephony::TCallStatusV1 			iCurrentStatus;


};

#endif // PHONECALLMAKER2_H
